#include "keycode.h"
#include "muk_core.h"

keymap_t *muk_default_keymap;

mku_stat_t keymap_create(uint8_t row, uint8_t col) {
    if ((row <= KEY_ROW_MAXSIZE) & (col <= KEY_COL_MAXSIZE)) {
        uint8_t *tmp, *_tmp;
        tmp = krhino_mm_alloc(sizeof(uint8_t) * row * col);
        _tmp = krhino_mm_alloc(sizeof(uint8_t) * row * col);

        if (tmp == NULL) {
            return MKU_MATRIX_ERR;
        }

        muk_default_keymap->layout = 0;
        muk_default_keymap->row = row;
        muk_default_keymap->col = col;
        muk_default_keymap->default_keymap = tmp;
        muk_default_keymap->raise_keymap = _tmp;

        return MKU_SUCCESS;
    } else {
        return MKU_MATRIX_ERR;
    }
}

void activate_key_in_map(uint8_t row, uint8_t col) {}